package com.pengtu.entity.asset.office;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.apache.commons.lang.builder.ToStringBuilder;

import com.pengtu.entity.IdEntity;
import com.pengtu.entity.app.Department;

/**
 * Information.
 */
@Entity(name="com.pengtu.entity.asset.office.Information")
@Table(name = "T_ASST_OFFICE_INFORMATION", schema = "DGJD")
public class Information extends IdEntity {

	/**
	 * serialVersionUID:TODO
	 * 
	 * @since 1.0.0
	 */

	private static final long serialVersionUID = 1L;

	private String name;
	private Department department;
	private String code;
	private String type;
	private String model;
	private Double price;
	private String brand;
	private String buyer;
	private Date buydate;
	private String stored;
	private String recorder;
	private Date recorddate;
	private String remark;
	private Set<Record> records = new HashSet<Record>(0);
	private String sindex;
	private String area;
	private String count;
	private String unit;
	private String factory;
	private Date manufacturer;
	private String productNo;
	private String unitizeNo;
	private String officer;
	private String asstState;
	
	public Information() {
	}

	@Column(name = "NAME", length = 200)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@ManyToOne
	@JoinColumn(name="DEPTID")
	public Department getDepartment() {
		return this.department;
	}

	public void setDepartment(Department department) {
		this.department = department;
	}

	@Column(name = "CODE", length = 100)
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "TYPE", length = 3)
	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Column(name = "MODEL", length = 200)
	public String getModel() {
		return this.model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	@Column(name = "PRICE", precision = 18)
	public Double getPrice() {
		return this.price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	@Column(name = "BRAND", length = 200)
	public String getBrand() {
		return this.brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	@Column(name = "BUYER", length = 100)
	public String getBuyer() {
		return this.buyer;
	}

	public void setBuyer(String buyer) {
		this.buyer = buyer;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "BUYDATE", length = 7)
	public Date getBuydate() {
		return this.buydate;
	}

	public void setBuydate(Date buydate) {
		this.buydate = buydate;
	}

	@Column(name = "STORED", length = 200)
	public String getStored() {
		return this.stored;
	}

	public void setStored(String stored) {
		this.stored = stored;
	}

	@Column(name = "RECORDER", length = 100)
	public String getRecorder() {
		return this.recorder;
	}

	public void setRecorder(String recorder) {
		this.recorder = recorder;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "RECORDDATE", length = 7)
	public Date getRecorddate() {
		return this.recorddate;
	}

	public void setRecorddate(Date recorddate) {
		this.recorddate = recorddate;
	}

	@Column(name = "REMARK", length = 500)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "information")
	public Set<Record> getRecords() {
		return this.records;
	}

	public void setRecords(Set<Record> records) {
		this.records = records;
	}
	
	@Column(name="SINDEX")
	public String getSindex() {
		return sindex;
	}

	public void setSindex(String sindex) {
		this.sindex = sindex;
	}

	@Column(name="AREA")
	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	@Column(name="COUNT")
	public String getCount() {
		return count;
	}

	public void setCount(String count) {
		this.count = count;
	}

	@Column(name="UNIT")
	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}
	
	@Column(name="FACTORY")
	public String getFactory() {
		return factory;
	}

	public void setFactory(String factory) {
		this.factory = factory;
	}
	
	@Column(name="MANUFACTURER")
	public Date getManufacturer() {
		return manufacturer;
	}

	public void setManufacturer(Date manufacturer) {
		this.manufacturer = manufacturer;
	}
	
	@Column(name="PRODUCTNO")
	public String getProductNo() {
		return productNo;
	}

	public void setProductNo(String productNo) {
		this.productNo = productNo;
	}

	@Column(name="UNITIZENO")
	public String getUnitizeNo() {
		return unitizeNo;
	}

	public void setUnitizeNo(String unitizeNo) {
		this.unitizeNo = unitizeNo;
	}
	
	@Column(name="OFFICER")
	public String getOfficer() {
		return officer;
	}

	public void setOfficer(String officer) {
		this.officer = officer;
	}
	
	@Column(name="ASSTSTATE")
	public String getAsstState() {
		return asstState;
	}

	public void setAsstState(String asstState) {
		this.asstState = asstState;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
	
	
}
